import axios from 'axios'

export default class DeviceInspectService {
    static deviceInpectService = null

    static getInstance(){
        if(this.deviceInpectService == null){
            this.deviceInpectService = new DeviceInspectService()
        }
        return this.deviceInpectService
    }

    //添加
    save(params){
        return axios.post(`http://localhost/deviceInspects`,params)
    }

    //拿到部门
    getdept(){
        return axios.get(`http://localhost/deviceInspects/getdept`)
    }

    list(params){
        return axios.get(`http://localhost/deviceInspects`,{
            params
        })
    }

    listNopage(params){
        return axios.get(`http://localhost/deviceInspects/listNopage`,{
            params:params
        })
    }


    //修改
    update(params){
        return axios.put(`http://localhost/deviceInspects`,params)
    }

    selectEnclosures(attachIds){
        return axios.get(`http://localhost/deviceInspects/selectEnclosures/${attachIds}`)
    }

    selectMaterialInfos(id){
        return axios.get(`http://localhost/deviceInspects/selectMaterialInfos/${id}`)
    }
}